<template>
	<div>
        <mu-tabs :value="activeTab" @change="handleSelect" class="muTabs">
            <mu-tab value="1" title="任务发布"/>
            <mu-tab value="2" title="成员列表"/>
            <mu-tab value="3" title="组织架构"/>
            <mu-tab value="4" title="职位列表"/>
        </mu-tabs>
		<div>
			<router-view/>
		</div>
	</div>
</template>

<script>
import { mapState } from 'vuex'
export default {
    data() {
        return {
            activeTab: '1'
        };
    },
    computed: mapState(['userInfo', 'curDate']),
    methods: {
    	handleSelect(key) {
            this.activeTab = key;
        	switch(parseInt(key)){
                case 1:
                    this.$router.push('/system/addTask')
                    break;
                case 2:
                    this.$router.push('/system/personList')
                    break;
                case 3:
                    this.$router.push('/system/structure')
                    break;
                case 4:
                    this.$router.push('/system/jobList')
                    break;
        		default: break;
        	}
    	}
    }
}
</script>